<template>
  <span
    :class="{ unDataLoadingTextFull: loading }"
    v-loading="loading"
    :element-loading-text="text"
    :element-loading-spinner="icon"
  >
    {{ loading ? "" : value }}
  </span>
</template>

<script>
export default {
  data() {
    return {};
  },
  props: {
    value: String,
    loading: Boolean,
    text: {
      type: String,
      default: () => {
        return "拼命加载中";
      },
    },
    icon: {
      type: String,
      default: () => {
        return "el-icon-loading";
      },
    },
  },
};
</script>

<style lang="stylus">
.unDataLoadingTextFull {
  display: inline-block;
  height: 100% !important;
  width: 100% !important;
}
</style>